import request from '@/utils/request'
import { FriendLink, FriendLinkApplyFrom } from '@/api/friendLink/type'

const api = '/v1/friendLink'

// 友情链接
export const listFriendLinkVo = (): Result<FriendLink[]> => {
  return request({
    url: `${api}/listVo`,
    method: 'get'
  })
}

// 友链申请
export const friendLinkApply = (data: FriendLinkApplyFrom): Result<void> => {
  return request({
    url: `${api}/apply`,
    method: 'post',
    data: data
  })
}
